package com.springboot.controller;

import com.springboot.service.EbookService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api")
public class TestController {

    @Resource
    private EbookService ebookService;

    @GetMapping("/test")
    public String testGet() {
        return "{‘status’: 200}";
    }

    @PostMapping("/test")
    public String testPost(@RequestBody String body) {
        return body;
    }

    // 查询Test
    @GetMapping("/ebook/list")
    public Object list() {
        return ebookService.list();
    }
}
